package com.zqu.service.impl;

import com.zqu.mapper.PManagerment.AdditionalProductOrderMapper;
import com.zqu.pojo.AdditionalProductOrder;
import com.zqu.service.AdditionalProductOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdditionalProductOrderServiceImpl implements AdditionalProductOrderService {

    @Autowired(required = false)
    private AdditionalProductOrderMapper additionalProductOrderMapper;

    @Override
    public AdditionalProductOrder selectAdditionalProductOrderById(long id) {
        return additionalProductOrderMapper.selectTById(id);
    }

    @Override
    public List<AdditionalProductOrder> selectList(AdditionalProductOrder additionalProductOrder) {
        return additionalProductOrderMapper.selectList(additionalProductOrder);
    }

    @Override
    public boolean insertAdditionalProductOrder(AdditionalProductOrder additionalProductOrder) {
        return additionalProductOrderMapper.insertT(additionalProductOrder)>0;
    }

    @Override
    public boolean updateAdditionalProductOrder(AdditionalProductOrder additionalProductOrder) {
        return additionalProductOrderMapper.updateT(additionalProductOrder)>0;
    }

    @Override
    public boolean deleteAdditionalProductOrder(long id) {
        return additionalProductOrderMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteAdditionalProductOrderByIds(String[] ids) {
        return additionalProductOrderMapper.deleteTByIds(ids)>0;
    }
}
